package com.hqq.pack2;
//切面类

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

import java.util.Date;

@Aspect
public class MyAspect {

    /**
     * @AfterReturning:后置通知
     * 有两个属性
     */
    @AfterReturning(value = "execution(* *..SomeServiceImpl.doOther(..))",returning = "res")
    public void AfterReturning(Object res){

        System.out.println("后置通知：在目标对象执行之后，可以获取返回值"+res);
        if (res.equals("bc")){
            System.out.println("abc验证成功");
        }

        //修改 返回值 看最终是否影响==没影响
        res = "CHANGE";
    }

}
